import java.time.OffsetDateTime;

public class java09 {
    public static void main(String[] args) {
        String l="hello java";
        String t="hello java";
        //字符串比较   equals(比较)
        if (l.equals(t)){
            //字符串替换  replace(替换)
          String f=l.replace(" ","");
            System.out.println(f);

           String f2 =t.replace("java","word");
            System.out.println(f2);
        }
    }
}
